package com.wunong.smart.commission.domain.state.impl;

import com.wunong.smart.commission.application.request.support.CancelCommissionRequest;
import com.wunong.smart.commission.client.enums.CommissionStatusEnum;
import com.wunong.smart.commission.domain.model.CommissionDomain;
import com.wunong.smart.commission.domain.state.AbstractCommissionState;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * @author create by zealot.zt
 */
@Slf4j
@Component
public class CanceledCommissionState extends AbstractCommissionState {

    @Override
    public CommissionDomain cancel(CancelCommissionRequest request, CommissionDomain domain) {
        log.warn("commissionState#cancel already success, userId:{}, id:{}",
                domain.getUserId(), domain.getId());
        return domain;
    }

    @Override
    public CommissionStatusEnum getStatusEnum() {
        return CommissionStatusEnum.CANCELED;
    }

}
